<div class="category">
	<?php
		require_once('lib/sql.utils.php');
		require_once('lib/same_book.php');
		$sql_utils = new SqlUtils();
		$categoryId = $_GET['categoryId'];
		$result = $sql_utils->getRows('SELECT * FROM categories WHERE categoryId = '.$categoryId);
		echo '<p>'.$result[0]['categoryName'].'</p>';
		echo '<div class="category-description">';
			echo $result[0]['categoryDescription'];
		echo '</div>';
		echo '<button class="back-btn" onclick="prevContent()"></button>';
		echo '<br />';
		echo '<br />';
		echo '<br />';
		echo 'Các tủ sách trong Danh mục : '.$result[0]['categoryName'];
		$result = $sql_utils->getRows('SELECT * 
										FROM categorydetails
										WHERE categoryId = '.$categoryId);
		//print_r($result);
		$samebook = array();
		for ($i=0; $i < count($result); $i++) {
			$samebook[$i] = new sameBook('SELECT * FROM books WHERE categoryDetailId = '.$result[$i]['categoryDetailId'],
									'Tủ sách : '.$result[$i]['categoryDetailName'],'same-book');
			$samebook[$i]->display();
		}
		$temp = $_GET['temp'];
		echo $temp;
	?>
</div>